package com.CoherenceSampleBase.Entities;

import java.io.IOException;

import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
import com.tangosol.util.Base;

public class Person extends Base implements PortableObject{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int iD; 
	private String firstName;
	private String lastName;
	private String address;
	private String title;
	
	public Person()
	{
	}
		
	public int getID() {
		return iD;
	}

	public void setID(int id) {
		iD = id;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	//@Override
	public void readExternal(PofReader reader) throws IOException {
		iD = reader.readInt(0);
		firstName = reader.readString(1);
		lastName = reader.readString(2);
		address = reader.readString(3);
		title = reader.readString(4);
	}
	//@Override
	public void writeExternal(PofWriter writer) throws IOException {
		writer.writeInt(0, iD);
		writer.writeString(1, firstName);
		writer.writeString(2, lastName);
		writer.writeString(3, address);
		writer.writeString(4, title);
	}
}
